<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>在线用户</title>
</head>
<body>
<%-- el 取值  page --> request --> session --> servletContext--%>
当前在线人数为 ${onlineNum}
<table border="1" width="800px">
    <tr>
        <th>序号</th>
        <th>用户名</th>
        <th>登录时间</th>
        <th>最后一次访问时间</th>
        <th>过期时间</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    <c:forEach var="a" items="${list}" varStatus="st">
        <tr>
            <td>${st.count}</td>
            <td>${a.username}</td>
            <td><fmt:formatDate value="${a.startTimestamp}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td><fmt:formatDate value="${a.lastAccessTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td>${a.timeout / 60}分钟</td>
            <td>在线</td>
            <td><a href="outline?id=${a.id}">下线</a></td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
